const uuidv1 = require('uuid/v1');
var mqtt = require('mqtt')
var client  = mqtt.connect('mqtt://localhost:1883')

client.on('connect', function () {
  client.subscribe('presence-xx')
//   client.publish('presence', 'Hello mqtt @')
})

client.on('message', function (topic, message) {
  // message is Buffer
  console.log("message --- ", message.toString())
//   client.end()
})

